import requests
import json
from urllib import parse

headers = {
    'Host': 'itest.api.kuai8.mobi',
    'cp-uuid': '4c51cc98f0bfca72d8a38e09c8c7b32bc9081902',
    'User-Agent': 'kuai8shi pai/1.1.3 (iPhone; iOS 12.1.4; Scale/2.00)',
    'cp-abid':'2-100',
    'cp-appid':'800',
    'cp-sign': '12686a917ebcfb595f5f0d5cf06cfc49',
    'cp-ver': '1.1.3',
    'cp-time':'1553224952',
    'cp-token': '4FaL3BoiB5pjVf1S7yYdKx3JmNSiQ~TmV-mSRgt6T4s',
    'Content-Length':'44',
    'cp - os': 'ios',
    'cp - vend': 'kuai8',
    'cp - oem': 'iphone8',
    'Accept - Language': 'zh-Hans-CN;q=1',
    'cp - sver':'12.1.4',
    'Accept':'* / *',
    'Content - Type':'application /x-www-form-urlencoded',
    'cp - channel':'appstore',
    'Accept - Encoding':'gzip, deflate',
    'BodyEncode':'1',
    'AppKey':'kuai8 - ios',
    'Connection':'keep - alive'}


def test_likeMeid():
    url = 'http://itest.api.kuai8.mobi/1/media/like.json'
    data = {
        "smid": "PqlJ1d6rH8prEr-b8oGZ61n7E4DPKQN9",
        "like": 0
    }
    r = requests.post(url,data=data,headers=headers)
    print(json.dumps(r.json(),sort_keys=True,ensure_ascii=False,indent=True))


test_likeMeid()
